import request from "../utils/request";

export function getSales(page = 1, pageSize = 15, sortBy = null) {
  return request.get('/sales', {
    params: {page, pageSize, sortBy}
  })
}

export function getSale(id) {
  return request.get('/sales/' + id);
}

export function addSale(sale) {
  return request.post('/sales', sale);
}
